package main

import (
	"go-reptile/crawler/engine"
	"go-reptile/crawler/zhenai/paser"
	"go-reptile/crawler/scheduler"
	"go-reptile/crawler/persist"
)

func main() {
	const url = "http://www.zhenai.com/zhenghun"
	/*engine.SimpleEngine{}.Run(engine.Request{
		Url : 				url,
		ParserFunc:	citylist.ParseCityList,
	})*/

	itemChan, err := persist.ItemSaver("dating_profile")
	if err !=nil {
		panic(err)
	}

	concurrentEngine := engine.ConcurrentEngine{
		Scheduler: 			&scheduler.QueuedScheduler{},
		WorkerCount: 		100,
		ItemChan:				itemChan,
	}
	concurrentEngine.Run(
		engine.Request{
			Url: 					url,
			ParserFunc:	citylist.ParseCityList,
		},
	)
}


